//
//  WYMessageListCell.m
//  Boss
//
//  Created by admin on 2018/8/14.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "WYMessageListCell.h"
@interface WYMessageListCell()

@property (strong, nonatomic) IBOutlet NSLayoutConstraint *lineHeight;
@property (strong, nonatomic) IBOutlet UIButton *redBtn;

@property (strong, nonatomic) IBOutlet NSLayoutConstraint *redBtnWidth;

@property (strong, nonatomic) IBOutlet NSLayoutConstraint *redBtnHeight;

@end
@implementation WYMessageListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.lineHeight.constant = kLineHeight;
    [self.redBtn setBackgroundColor:kColorMainColor];
    [self.redBtn setCornerRadius:5.f];
    // Initialization code
}
-(void)setCount:(NSString *)count
{
    _count = count;
    if (count.integerValue ==0) {
        self.redBtn.hidden = YES;
    }else if(count.integerValue==1){
        self.redBtn.hidden = NO;
        
        
    }else{
        self.redBtn.hidden = NO;
        self.redBtnWidth.constant = 26;
        self.redBtnHeight.constant = 18;
        [self.redBtn setCornerRadius:9.f];
        [self.redBtn setTitle:count forState:UIControlStateNormal];
        [self.redBtn setTintColor:[UIColor whiteColor]];
        self.redBtn.titleLabel.font = [UIFont systemFontOfSize:14];
        
    }
    
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
